package com.ywu.boot.utils;

import lombok.Getter;
import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.stereotype.Component;

/**
 * @ClassName YwuSpringContextHolder
 * @Description TODO
 * @Author GroundDemo
 * @Date 2024/9/16 9:34
 * @Version 1.0
 **/
@Component
@Getter
public class YwuSpringContextHolder implements ApplicationContextAware {
    public static ApplicationContext applicationContext;

    @Override
    public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
        YwuSpringContextHolder.applicationContext = applicationContext;
    }
}
